import java.util.Scanner;

/**
 * Creat with IntelliJ IDEA
 * Description
 * User: mamba24
 * Date: 2022-11-26
 * Time: 11:19
 * To BE A Better Person-2020-3-2
 */
public class Test {

    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        double timeStamp= sc.nextDouble();
        double dayRemaind=timeStamp%86400;
        int h=0,m=0,s=0;
        if(dayRemaind == 0){
            //我给的时间刚好一天
            System.out.println("00:00:00");
        }else{
            //大于一天

            //计算小时
            h=(int)dayRemaind/3600;
            dayRemaind%=3600;
            //计算分钟
            m= (int) (dayRemaind/60);
            dayRemaind%=60;
            s= (int) dayRemaind;
        }
        System.out.printf("%02d:%02d:%02d",h,m,s);
    }
}
